﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace GA_SCHED_DESIGNER
{
    /// <summary>
    /// Interaction logic for GroupWindow.xaml
    /// </summary>
    public partial class GroupWindow : Window
    {
        Acceron.University.DBAccess.CRM_University_GADataContext conetxt;

        public GroupWindow()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(GroupWindow_Loaded);
        }

        void GroupWindow_Loaded(object sender, RoutedEventArgs e)
        {
            conetxt = new Acceron.University.DBAccess.CRM_University_GADataContext();
            this.dataGrid1.ItemsSource = conetxt.Groups;
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            conetxt.SubmitChanges();

            DialogResult = true;
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }
    }
}
